/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/


using System;
using System.Runtime.InteropServices;

namespace BitLaboratory.Win32Api.Windows
{
	//public const CCHILDREN_TITLEBAR			= 5;

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct MSG
#else
	public struct MSG
#endif
	{
		public IntPtr hwnd;
		public int message;
		public IntPtr wParam;
		public IntPtr lParam;
		public int time;
		public int pt_x;
		public int pt_y;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct GUITHREADINFO 
#else
	public struct GUITHREADINFO 
#endif
	{
		public int					cbSize;
		public GuiThreadInfoFlag	flags;
		public IntPtr				hwndActive;
		public IntPtr				hwndFocus;
		public IntPtr				hwndCapture;
		public IntPtr				hwndMenuOwner;
		public IntPtr				hwndMoveSize;
		public IntPtr				hwndCaret;
		public RECT					rcCaret;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct TITLEBARINFO 
#else
	public struct TITLEBARINFO 
#endif
	{
		public uint cbSize;
		public RECT  rcTitleBar;
		// Size je CCHILDREN_TITLEBAR+1
		[ MarshalAs( UnmanagedType.ByValArray, SizeConst=6 )] 
		public uint[] rgstate;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct WINDOWINFO 
#else
	public struct WINDOWINFO 
#endif
	{
		public uint cbSize;
		public RECT  rcWindow;
		public RECT  rcClient;
		public WindowStyles dwStyle;
		public WindowStylesEx dwExStyle;
		public uint dwWindowStatus;
		public uint  cxWindowBorders;
		public uint  cyWindowBorders;
		public short  atomWindowType;
		public short  wCreatorVersion;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct WINDOWPLACEMENT 
#else
	public struct WINDOWPLACEMENT 
#endif
	{ 
		public uint  length; 
		public WindowPlacementFlags  flags; 
		public ShowWindowStyles  showCmd; 
		public POINT ptMinPosition; 
		public POINT ptMaxPosition; 
		public RECT  rcNormalPosition; 
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct ALTTABINFO 
#else
	public struct ALTTABINFO 
#endif
	{
		public uint	 cbSize;
		public int   cItems;
		public int   cColumns;
		public int   cRows;
		public int   iColFocus;
		public int   iRowFocus;
		public int   cxItem;
		public int   cyItem;
		public POINT ptStart;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct WNDCLASS
#else
	public struct WNDCLASS
#endif
	{
		public int style;
		public WNDPROC lpfnWndProc;
		public int cbClsExtra;
		public int cbWndExtra;
		public IntPtr hInstance;
		public IntPtr hIcon;
		public IntPtr hCursor;
		public IntPtr hbrBackground;
		public string lpszMenuName;
		public string lpszClassName;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct WNDCLASSEX
#else
	public struct WNDCLASSEX
#endif
	{
		public int cbSize;
		public int style;
		public WNDPROC lpfnWndProc;
		public int cbClsExtra;
		public int cbWndExtra;
		public IntPtr hInstance;
		public IntPtr hIcon;
		public IntPtr hCursor;
		public IntPtr hbrBackground;
		public string lpszMenuName;
		public string lpszClassName;
		public IntPtr hIconSm;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct WINDOWPOS
#else
	public struct WINDOWPOS
#endif
	{
		public IntPtr hWnd;
		public IntPtr hWndInsertAfter;
		public int x;
		public int y;
		public int cx;
		public int cy;
		public WindowPosFlags flags;
	}

	[StructLayout(LayoutKind.Sequential)]
#if( _SHARED_ )
	internal struct NCCALCSIZE_PARAMS
#else
	public struct NCCALCSIZE_PARAMS
#endif
	{
		public RECT rgrc0;
		public RECT rgrc1;
		public RECT rgrc2;
		public IntPtr lppos;
	}

	[StructLayoutAttribute(LayoutKind.Sequential, Pack=1, Size=0)]
#if( _SHARED_ )
	internal struct BLENDFUNCTION
#else
	public struct BLENDFUNCTION
#endif
	{
		public byte BlendOp;
		public byte BlendFlags;
		public byte SourceConstantAlpha;
		public byte AlphaFormat;
	}

}
